import java.io.File;

/**
 * 
 */

/**
 * @author shilpa
 * 
 */
public class Element {

	private String elementKey;
	private String elementName;
	private String imageFile;
	private String soundFile;
	private String color;

	/**
	 * 
	 */
	public Element(String name, String image, String sound, String color) {

		imageFile = getAbsolutePath(image);
		
		soundFile = sound;
		
		// elementKey = key;
		elementName = name;
		this.color = color;
	}

	public Element(String key, String name, String image, String sound,
			String color) {

		imageFile = getAbsolutePath(image);
		//soundFile = getAbsolutePath(sound);
		soundFile = sound;
		// elementKey = key;
		elementName = name;
		this.color = color;
	}

	public static String getAbsolutePath(String file) {
		if (new File(file).isAbsolute()) {
			return file;
		}
		return new File("").getAbsoluteFile() + "\\src\\" + file;
	}

	public String getElementKey() {
		return elementKey;
	}

	public String getElementName() {
		return elementName;
	}

	public String getImageFile() {
		return imageFile;
	}

	public String getSoundFile() {
		return soundFile;
	}

	public String getColor() {
		return color;
	}

}
